﻿using EasyXaf.LowCode.WorkflowEditors.Models.Activities;
using System.Xml.Linq;

namespace EasyXaf.LowCode.WorkflowEditors.Models;

public interface IWorkflow : IContainer
{
    string SelectedActivityId { get; set; }

    IContainer CurrentContainer { get; set; }

    string CloningActivity { get; set; }

    string CuttingActivity { get; set; }

    string CloningBranch { get; set; }

    string CuttingBranch { get; set; }

    void ClearClipboard();

    ISequence FindSequence(string sequenceId, ISequence owner);

    IActivity FindActivity(string activityId, ISequence owner);

    INode FindNode(string nodeId, ISequence owner);

    IActivity CreateActivityFromXml(XElement element, ISequence sequence);

    IBranch CreateBranchFromXml(XElement element, IActivity activity);

    void ChangeCurrentContainer(string containerId);

    void RaiseWorkflowChanged();

    event EventHandler CurrentContainerChanged;

    event EventHandler WorkflowChanged;
}
